<?php

namespace Ue\ErpBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class DefaultController extends Controller
{
    /**
     * @Route("/")
     * @Template()
     */
    public function indexAction($name=23)
    {
        $order  = $this->getDoctrine()->getManager()
                ->getRepository('UeErpBundle:Order')
                ->find(183699);
        if(!$order){
            throw $this->createNotFoundException('Order 183699 Not Found!');
        }
        \Doctrine\Common\Util\Debug::dump($order->getItems());
        exit;
        return array('name' => $name);
    }
}
